﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta><style>/*<![CDATA[*/

table{border: 1px solid gray;}
td{border: 1px dotted gray;}
p{margin: 3px 0 3px 0; padding: 0;}
#ID_Footer{font-size: small; font-style: italic; text-align: right; margin-top: 4em; padding-top: 4px; border-top: 2px solid gray;}

/*]]>*/</style><title>第2章 数据的存储与检索</title></head><body>
<div><span style="font-family: 微软雅黑; font-size: 20pt; font-weight: bold; padding-left: 49pt; line-height: 190%">第</span><span style="font-family: Consolas; font-size: 20pt; font-weight: bold; padding-left: 49pt; line-height: 190%">2</span><span style="font-family: 微软雅黑; font-size: 20pt; font-weight: bold; padding-left: 49pt; line-height: 190%">章 &nbsp; &nbsp; &nbsp; &nbsp;数据的存储与检索</span></div>
<div><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">保存数据的两种方式：保存到</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; line-height: 170%">flat file</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">，或者保存到</span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; line-height: 170%">数据库</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">中。</span></div>
<div><br /></div>
<div><span style="font-family: 微软雅黑; font-size: 18pt; font-weight: bold; padding-left: 70pt; line-height: 170%">2.1 &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-family: 宋体; font-size: 18pt; font-weight: bold; padding-left: 70pt; line-height: 170%">打开文件</span><span style="font-family: Calibri; font-size: 18pt; font-weight: bold; padding-left: 70pt; line-height: 170%">(p38)</span></div>
<div><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">文件模式</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">(</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">打开文件时指定如何使用文件</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">)</span></div>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 12pt">只读、只写、读写</span></li>
<li><span style="font-family: 宋体; font-size: 12pt">写：新建、终止程序、覆盖已有内容、追加到结尾</span></li>
<li><span style="font-family: 宋体; font-size: 12pt">二进制或纯文本方式</span></li></ol>
<div><br /></div>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">2.1.1 </span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">使用</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%"> </span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 160%">fopen</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">() </span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">函数打开文件</span></div>
<div><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #2f5496; padding-left: 21pt; line-height: 190%">$fp = fopen(&quot;</span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; font-style: italic; color: #2f5496; padding-left: 21pt; line-height: 190%">filepath</span><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #2f5496; padding-left: 21pt; line-height: 190%">&quot;, filemode, include_path, &lt;</span><span style="font-family: 宋体; font-size: 12pt; font-style: italic; color: #2f5496; padding-left: 21pt; line-height: 190%">允许文件名称以协议名称开始</span><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #2f5496; padding-left: 21pt; line-height: 190%">&gt;);</span></div>
<div><span style="font-family: 宋体; font-size: 12pt; font-weight: bold; color: #c45911; padding-left: 21pt; line-height: 190%">include_path</span><span style="font-family: 宋体; font-size: 12pt; color: #c45911; padding-left: 21pt; line-height: 190%">:</span><span style="font-family: 宋体; font-size: 12pt; padding-left: 21pt; line-height: 190%"> 可选，在php配置中设置的一个搜索路径</span><span style="font-family: 宋体; font-size: 12pt; color: #c45911; padding-left: 21pt; line-height: 190%">。</span></div>
<div><span style="font-family: 宋体; font-size: 12pt; padding-left: 21pt; line-height: 190%">返回值：</span><span style="font-family: 宋体; font-size: 12pt; padding-left: 21pt; line-height: 190%">文件指针，resource 类型。</span></div>
<div><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">Web</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">服务器文档的根：</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 170%">$_SERVER[&apos;DOCUMENT_ROOT&apos;]</span></div>
<div><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">路径：</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">(p40)</span></div>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 12pt"> 相对路径、绝对路径</span></li>
<li><span style="font-family: 宋体; font-size: 12pt"> 没有指定路径，则在</span><span style="font-family: 宋体; font-size: 12pt; font-weight: bold">脚本所在目录</span><span style="font-family: 宋体; font-size: 12pt">查找或创建文件</span></li></ol>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: 宋体; font-size: 12pt">通过</span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold">CGI</span><span style="font-family: 宋体; font-size: 12pt; font-weight: bold">封装程序</span><span style="font-family: 宋体; font-size: 12pt">来运行</span><span style="font-family: Consolas; font-size: 12pt">php</span><span style="font-family: 宋体; font-size: 12pt">的，根据服务器设定</span></li></ol>
<div><span style="font-family: 宋体; font-size: 14pt; line-height: 240%">转义字符：反斜线</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 240%">\</span></div>
<div><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; line-height: 160%">目录间隔符</span></div>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt"> </span><span style="font-family: Consolas; font-size: 12pt">Windows</span><span style="font-family: 宋体; font-size: 12pt">平台：</span><span style="font-family: 宋体; font-size: 12pt; font-weight: bold; color: #ff0000">正斜线/</span><span style="font-family: 宋体; font-size: 12pt">或</span><span style="font-family: 宋体; font-size: 12pt; font-weight: bold; color: #ff0000">反斜线</span><span style="font-family: 宋体; font-size: 12pt">，但反斜线须转义（即</span><span style="font-family: 宋体; font-size: 12pt; font-weight: bold; color: #ff0000">\\</span><span style="font-family: 宋体; font-size: 12pt">）</span></li></ol>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: Consolas; font-size: 12pt">Linux</span><span style="font-family: 宋体; font-size: 12pt">平台：正斜线</span><span style="font-family: 宋体; font-size: 12pt; font-weight: bold; color: #ff0000">/</span></li></ol>
<div><span style="font-family: 宋体; font-size: 14pt; line-height: 140%">文件模式总结：（</span><span style="font-family: Consolas; font-size: 14pt; line-height: 140%">P40</span><span style="font-family: 宋体; font-size: 14pt; line-height: 140%">）</span></div>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: Consolas; font-size: 12pt">r, </span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; color: #ff0000">r+</span></li>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: Consolas; font-size: 12pt">w,</span><span style="font-family: Consolas; font-size: 12pt; color: #ff0000"> w+</span></li>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold; color: #ff0000"> </span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; color: #ff0000">x, x+</span><span style="font-family: Consolas; font-size: 12pt">(</span><span style="font-family: 宋体; font-size: 12pt; font-weight: bold">谨慎写</span><span style="font-family: 宋体; font-size: 12pt">，如果文件已经存在，文件不会被打开，返回</span><span style="font-family: Consolas; font-size: 12pt">false,</span><span style="font-family: 宋体; font-size: 12pt">产生警报</span><span style="font-family: Consolas; font-size: 12pt">)</span></li>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: Consolas; font-size: 12pt">a, </span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; color: #ff0000">a+</span></li></ol>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: Consolas; font-size: 12pt">b, </span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; color: #ff0000">t</span></li></ol>
<div><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">fopen</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">的第</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">3</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">、第</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">4</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">个参数</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">(</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">可选</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">)</span></div>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: 宋体; font-size: 12pt">是否搜索</span><span style="font-family: Consolas; font-size: 12pt">include_path</span></li></ol>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: 宋体; font-size: 12pt">允许文件名称以协议名称开始，</span><span style="font-family: Consolas; font-size: 12pt">e.g. </span><a href="http://" style="font-family: Consolas; font-size: 12pt; text-decoration: underline; color: #0000ff">http://</a></li></ol>
<div><br /></div>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">2.1.2 </span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">通过</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%"> FTP </span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">或</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%"> HTTP </span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">打开文件</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">(p41)</span></div>
<div><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">php.ini</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">文件中</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 170%">allow_url_fopen</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">指令：开关此功能</span></div>
<div><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">文件名以</span><a href="ftp://" style="font-family: Consolas; font-size: 14pt; font-weight: bold; text-decoration: underline; color: #0000ff">ftp://</a><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">开始：建立连接到指定服务器的</span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; line-height: 170%">被动连接</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">，返回指向文件开始的</span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; line-height: 170%">指针</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">。</span></div>
<div><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">文件名以</span><a href="http://" style="font-family: Consolas; font-size: 14pt; font-weight: bold; text-decoration: underline; color: #0000ff">http://</a><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">开始：建立</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">HTTP</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">连接，返回指向</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; line-height: 170%">HTTP</span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; line-height: 170%">响应</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">的指针</span></div>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: 宋体; font-size: 12pt">早期版本目录名称后必须添加结束斜线，即</span><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><a href="http://www.example.com/" style="font-family: Consolas; font-size: 12pt; text-decoration: underline; color: #0000ff">http://www.example.com</a><span style="font-family: Consolas; font-size: 12pt; font-weight: bold">/</span></li></ol>
<div><br /></div>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">2.1.3 </span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">打开文件可能遇到的问题</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">(p41)</span></div>
<div><span style="font-family: Consolas; font-size: 14pt; line-height: 160%">fopen</span><span style="font-family: 宋体; font-size: 14pt; line-height: 160%">调用失败返回</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 160%">false</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">.(p42)</span></div>
<div><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">错误抑制方式</span></div>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold; color: #ff0000"> </span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; color: #ff0000">@</span><span style="font-family: Consolas; font-size: 12pt; color: #ff0000"> </span><span style="font-family: Consolas; font-size: 12pt">$fp = fopen(&quot;$DOCUMENT_ROOT/../orders.txt&quot;, &apos;ab&apos;);</span></li></ol>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: Consolas; font-size: 12pt">$fp = </span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; color: #ff0000">@</span><span style="font-family: Consolas; font-size: 12pt; color: #ff0000"> </span><span style="font-family: Consolas; font-size: 12pt">fopen(&quot;$DOCUMENT_ROOT/../orders.txt&quot;, &apos;ab&apos;);</span></li></ol>
<div><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">关闭</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">html</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">标记并退出：</span></div>
<div><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #c45911; padding-left: 21pt; line-height: 160%">echo &quot;</span><span style="font-family: Times New Roman; font-size: 12pt; font-style: italic; color: #c45911; padding-left: 21pt; line-height: 160%">...</span><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #c45911; padding-left: 21pt; line-height: 160%">&lt;/body&gt;&lt;/html&gt;&quot;;</span></div>
<div><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; color: #ff0000; padding-left: 21pt; line-height: 160%">exit;</span></div>
<div><br /></div>
<div><br /></div>
<div><span style="font-family: 微软雅黑; font-size: 18pt; padding-left: 70pt; line-height: 170%">2.2 &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-family: 宋体; font-size: 18pt; padding-left: 70pt; line-height: 170%">写文件</span><span style="font-family: Calibri; font-size: 18pt; padding-left: 70pt; line-height: 170%">(p43)</span></div>
<div><span style="font-family: Consolas; font-size: 14pt; color: #ff0000; line-height: 170%">fwrite</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">()(</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">别名</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 170%">fputs</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">())</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">：写到字符串末尾或</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; line-height: 170%">length</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">字节。</span></div>
<div><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #2f5496; padding-left: 21pt">int fwrite ( </span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; font-style: italic; color: #ff0000; padding-left: 21pt">resource</span><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #ff0000; padding-left: 21pt"> </span><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #2f5496; padding-left: 21pt">handle, string string [, int </span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; font-style: italic; color: #2f5496; padding-left: 21pt">length</span><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #2f5496; padding-left: 21pt">]);</span></div>
<div><span style="font-family: Consolas; font-size: 12pt; color: #c45911; padding-left: 21pt; line-height: 240%">fwrite($fp, $outputstring);</span></div>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 170%">file_put_contents</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">():</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">不用打开关闭，直接将字符串写到文件中。(类似的有</span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; line-height: 170%">file_get_contents</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">)</span></div>
<div><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #2f5496; padding-left: 21pt; line-height: 240%">int file_put_contents(string </span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; font-style: italic; color: #ff0000; padding-left: 21pt; line-height: 240%">filename</span><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #2f5496; padding-left: 21pt; line-height: 240%">, string </span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; font-style: italic; color: #ff0000; padding-left: 21pt; line-height: 240%">data </span><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #2f5496; padding-left: 21pt; line-height: 240%">[, int flags, resource context]])</span></div>
<div><span style="font-family: 宋体; font-size: 14pt; line-height: 240%">内置</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 240%">strlen</span><span style="font-family: Consolas; font-size: 14pt; line-height: 240%">()</span><span style="font-family: 宋体; font-size: 14pt; line-height: 240%">函数：获得字符串长度</span></div>
<div><span style="font-family: 宋体; font-size: 14pt; line-height: 240%">制表符：</span><span style="font-family: Consolas; font-size: 14pt; line-height: 240%">&quot;</span><span style="font-family: Times New Roman; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 240%">\</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 240%">t</span><span style="font-family: Consolas; font-size: 14pt; line-height: 240%">&quot;</span></div>
<div><span style="font-family: 微软雅黑; font-size: 18pt; font-weight: bold; padding-left: 70pt; line-height: 170%">2.3 &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-family: 宋体; font-size: 18pt; font-weight: bold; padding-left: 70pt; line-height: 170%">关闭文件</span></div>
<div>
<ol>
<li><span style="font-family: Consolas; font-size: 14pt; color: #ff0000"> fclose()</span><span style="font-family: 宋体; font-size: 14pt">函数，关闭文件。</span></li></ol>
<div>
<ol>
<li><span style="font-family: Consolas; font-size: 14pt"> echo</span><span style="font-family: 宋体; font-size: 14pt">语句后接的字符串</span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold">中</span><span style="font-family: 宋体; font-size: 14pt">，字符串</span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold">间</span><span style="font-family: 宋体; font-size: 14pt">都可换行（参见</span><span style="font-family: Consolas; font-size: 14pt">P46, P33</span><span style="font-family: 宋体; font-size: 14pt">）</span></li></ol>
<div>
<ol>
<li><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000"> number_format</span><span style="font-family: Consolas; font-size: 14pt">($variable, decimal digits, decimal point, thousands separator);(P46)</span></li></ol>
<div><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #2f5496; padding-left: 21pt; line-height: 240%">number_format($totalamount, 2, &apos;.&apos;, &apos; &apos;);</span></div>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 14pt"> exit 退出时</span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold">自动释放</span><span style="font-family: 宋体; font-size: 14pt">文件锁（flock)</span></li></ol>
<div><br /></div>
<div><br /></div>
<div><span style="font-family: 微软雅黑; font-size: 18pt; font-weight: bold; padding-left: 70pt; line-height: 170%">2.4 &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-family: 宋体; font-size: 18pt; font-weight: bold; padding-left: 70pt; line-height: 170%">读文件</span><span style="font-family: Calibri; font-size: 18pt; font-weight: bold; padding-left: 70pt; line-height: 170%">(p47)</span></div>
<div><span style="font-family: Consolas; font-size: 14pt; color: #ff0000; line-height: 240%">feof</span><span style="font-family: Consolas; font-size: 14pt; line-height: 240%">()</span><span style="font-family: 宋体; font-size: 14pt; line-height: 240%">：</span><span style="font-family: Consolas; font-size: 14pt; line-height: 240%">File End of File </span><span style="font-family: 宋体; font-size: 14pt; line-height: 240%">读到末尾</span><span style="font-family: Consolas; font-size: 14pt; line-height: 240%">(</span><span style="font-family: 宋体; font-size: 14pt; line-height: 240%">遇到</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 240%">EOF</span><span style="font-family: Consolas; font-size: 14pt; line-height: 240%">)</span><span style="font-family: 宋体; font-size: 14pt; line-height: 240%">则返回</span><span style="font-family: Consolas; font-size: 14pt; line-height: 240%">true.(p48)</span></div>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">2.4.1 </span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">每次读取一行数据：</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">fgets(), fgetss(), fgetcsv()</span></div>
<div><span style="font-family: Consolas; font-size: 14pt; color: #ff0000; line-height: 170%">fgets</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">()</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">函数：</span></div>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: Consolas; font-size: 12pt">$order = fgets($fp, 999);</span></li></ol>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: 宋体; font-size: 12pt">每次读一行，直到遇到</span><span style="font-family: Times New Roman; font-size: 12pt">\</span><span style="font-family: Consolas; font-size: 12pt">n, EOF</span><span style="font-family: 宋体; font-size: 12pt">或是读了</span><span style="font-family: Consolas; font-size: 12pt">998B</span></li></ol>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 170%">fgetss()</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">函数：</span></div>
<div><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #2f5496; padding-left: 21pt; line-height: 190%">string fgetss(resource fp, int length, string [allowable_tags]);</span></div>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: 宋体; font-size: 12pt">可以过滤字符串中的</span><span style="font-family: Consolas; font-size: 12pt">php</span><span style="font-family: 宋体; font-size: 12pt">和</span><span style="font-family: Consolas; font-size: 12pt">html</span><span style="font-family: 宋体; font-size: 12pt">标记，将要过滤的任何特殊标记包含在</span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; color: #ff0000">allowable_tags</span><span style="font-family: 宋体; font-size: 12pt">字符串中。</span></li></ol>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 170%">fgetcsv</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">()</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">函数</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%"> </span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">（</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; line-height: 170%">csv</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">: comma separated value</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">）</span></div>
<div><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #2f5496; padding-left: 21pt; line-height: 190%">array fgetcsv ( resource fp, int length [, string delimiter [, string enclosure]]);</span></div>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: 宋体; font-size: 12pt">文件中使用了定界符时，如逗号，可使用</span><span style="font-family: Consolas; font-size: 12pt">fgetcsv</span><span style="font-family: 宋体; font-size: 12pt">将文件分成多行</span></li></ol>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold; color: #ff0000"> </span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; color: #ff0000">enclosure</span><span style="font-family: 宋体; font-size: 12pt">指定每行中封闭每个域的字符，默认为</span><span style="font-family: Consolas; font-size: 12pt">&quot;(</span><span style="font-family: 宋体; font-size: 12pt">双引号</span><span style="font-family: Consolas; font-size: 12pt">)</span></li></ol>
<div><span style="font-family: Times New Roman; font-size: 12pt; line-height: 190%"> </span></div>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">2.4.2 </span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">读取整个文件：</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">readfile(), fpassthru(), file()</span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">和</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">file_get_contents()</span></div>
<div><span style="font-family: Consolas; font-size: 14pt; color: #ff0000; line-height: 170%">readfile()</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">函数：</span></div>
<div><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #2f5496; padding-left: 21pt; line-height: 190%">int readfile(string filename, [int use_include_path [, resource context]] );</span></div>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: 宋体; font-size: 12pt">打开文件，将文件输出到标准输出（浏览器），然后关闭文件。</span></li>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: Consolas; font-size: 12pt">context</span><span style="font-family: 宋体; font-size: 12pt">参数：文件远程（如通过</span><span style="font-family: Consolas; font-size: 12pt">HTTP</span><span style="font-family: 宋体; font-size: 12pt">）被打开时使用。</span></li></ol>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: 宋体; font-size: 12pt">返回从文件中读出的字节总数</span></li></ol>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 170%">fpassthru()</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">函数：</span></div>
<div><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #c45911; padding-left: 21pt; line-height: 160%">$fp = fopen(&quot;$DOCUMENT_ROOT/../orders/orders.txt&quot;, &apos;rb&apos;);</span></div>
<div><span style="font-family: Consolas; font-size: 12pt; padding-left: 21pt; line-height: 160%">fpassthru($fp);</span></div>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: 宋体; font-size: 12pt">使用</span><span style="font-family: Consolas; font-size: 12pt">fopen</span><span style="font-family: 宋体; font-size: 12pt">打开，传递文件指针给</span><span style="font-family: Consolas; font-size: 12pt">fpassthru</span><span style="font-family: 宋体; font-size: 12pt">，文件内容输出到标准输出，然后该函数（？？）关闭文件。</span></li></ol>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: 宋体; font-size: 12pt">成功返回</span><span style="font-family: Consolas; font-size: 12pt">true, </span><span style="font-family: 宋体; font-size: 12pt">失败返回</span><span style="font-family: Consolas; font-size: 12pt">false</span><span style="font-family: Times New Roman; font-size: 12pt">.</span></li></ol>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 170%">file</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">()</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">函数</span></div>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: 宋体; font-size: 12pt">文件内容不显示到输出而是</span><span style="font-family: 宋体; font-size: 12pt; text-decoration: underline">发送到数组</span><span style="font-family: 宋体; font-size: 12pt">，</span><span style="font-family: Consolas; font-size: 12pt"> </span><span style="font-family: 宋体; font-size: 12pt">文件内容的每一行作为数组的一个元素</span></li></ol>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: 宋体; font-size: 12pt">其它同</span><span style="font-family: Consolas; font-size: 12pt">readfile().</span><span style="font-family: 宋体; font-size: 12pt">早期版本中，对二进制文件不安全。</span></li></ol>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 170%">file_get_contents()</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">函数</span></div>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: 宋体; font-size: 12pt">以字符串形式返回文件内容，其它同</span><span style="font-family: Consolas; font-size: 12pt">readfile()</span><span style="font-family: Times New Roman; font-size: 12pt">.</span></li></ol>
<div><br /></div>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">2.4.3 </span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">读取一个字符：</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">fgetc()</span></div>
<div><span style="font-family: Consolas; font-size: 14pt; color: #ff0000; line-height: 140%">fgetc</span><span style="font-family: 宋体; font-size: 14pt; line-height: 140%">最后会返回</span><span style="font-family: Consolas; font-size: 14pt; line-height: 140%">EOF</span><span style="font-family: 宋体; font-size: 14pt; line-height: 140%">，而</span><span style="font-family: Consolas; font-size: 14pt; line-height: 140%">fgets</span><span style="font-family: 宋体; font-size: 14pt; line-height: 140%">不会，解决办法？(进行判断）</span></div>
<div><br /></div>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">2.4.4 </span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">读取任意长度：</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">fread()(p50)</span></div>
<div><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #2f5496; padding-left: 21pt">string </span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; font-style: italic; color: #ff0000; padding-left: 21pt">fread</span><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #2f5496; padding-left: 21pt">(resource fp, int length);</span></div>
<div><br /></div>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">2.4.5 </span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">其它文件函数</span></div>
<div><span style="font-family: Consolas; font-size: 14pt; color: #ff0000; line-height: 170%">file_exists()</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">：文件是否存在。</span></div>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 170%">filesize</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">()</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">：查看文件大小</span></div>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 170%">nl2br</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">()</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">：将</span><span style="font-family: Times New Roman; font-size: 14pt; line-height: 170%">\</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">n</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">字符转换成</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">HTML</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">换行符</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">(&lt;br /&gt;)</span></div>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 140%">unlink</span><span style="font-family: Consolas; font-size: 14pt; line-height: 140%">()</span><span style="font-family: 宋体; font-size: 14pt; line-height: 140%">：删除文件，无法删除返回</span><span style="font-family: Consolas; font-size: 14pt; line-height: 140%">false.</span></div>
<div><br /></div>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">2.4.6 </span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">文件中定位（</span><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">P51</span><span style="font-family: 宋体; font-size: 14pt; font-weight: bold; color: #000000; line-height: 160%">）</span></div>
<div><span style="font-family: Consolas; font-size: 14pt; color: #ff0000; line-height: 170%">rewind</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">():</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">文件指针复位到文件的开始</span><span style="font-family: Times New Roman; font-size: 14pt; line-height: 170%">.</span></div>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 170%">ftell</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">()</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">：以字节为单位报告文件指针当前在文件中的位置</span></div>
<div><span style="font-family: Consolas; font-size: 14pt; font-weight: bold; color: #ff0000; line-height: 170%">fseek</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">()</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">：</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%"> </span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">将文件指针指到某个位置</span><span style="font-family: Times New Roman; font-size: 14pt; line-height: 170%">.</span></div>
<div><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #2f5496; padding-left: 21pt">int fseek ( resource fp, int offset [, int whence] )</span></div>
<div>
<ol>
<li><span style="font-family: 宋体; font-size: 10pt; font-weight: bold"> </span><span style="font-family: Consolas; font-size: 12pt">whence: SEEK_SET(</span><span style="font-family: 宋体; font-size: 12pt">默认</span><span style="font-family: Consolas; font-size: 12pt">), SEET_CUR, SEEK_END.</span></li></ol>
<div><br /></div>
<div><br /></div>
<div><span style="font-family: 微软雅黑; font-size: 18pt; font-weight: bold; padding-left: 70pt; line-height: 170%">2.5 &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-family: 宋体; font-size: 18pt; font-weight: bold; padding-left: 70pt; line-height: 170%">文件锁定</span></div>
<div><span style="font-family: Consolas; font-size: 14pt; color: #ff0000; line-height: 170%">flock</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">()</span><span style="font-family: 宋体; font-size: 14pt; line-height: 170%">函数</span><span style="font-family: Consolas; font-size: 14pt; line-height: 170%">:</span></div>
<div><span style="font-family: Consolas; font-size: 12pt; font-style: italic; color: #2f5496; padding-left: 21pt; line-height: 190%">bool flock (resource fp, int operation [, int &amp; wouldblock ])</span></div>
<div><span style="font-family: 宋体; font-size: 10pt; font-weight: bold; padding-left: 41pt; line-height: 160%">* &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-family: 宋体; font-size: 12pt; padding-left: 41pt; line-height: 160%">锁定成功返回</span><span style="font-family: Consolas; font-size: 12pt; padding-left: 41pt; line-height: 160%">true</span><span style="font-family: 宋体; font-size: 12pt; padding-left: 41pt; line-height: 160%">，即获得了锁，可以使用文件。</span></div>
<div><span style="font-family: 宋体; font-size: 10pt; font-weight: bold; padding-left: 41pt; line-height: 160%">* &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-family: 宋体; font-size: 12pt; padding-left: 41pt; line-height: 160%">文件打开，并进行读写操作前，调用此函数。要使用锁，则放在所有使用文件的脚本中，否则没有意义。</span></div>
<div><span style="font-family: 宋体; font-size: 10pt; font-weight: bold; padding-left: 41pt; line-height: 160%">* &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-family: 宋体; font-size: 12pt; padding-left: 41pt; line-height: 160%">获得文件锁导致当前进程被阻塞，则</span><span style="font-family: Consolas; font-size: 12pt; padding-left: 41pt; line-height: 160%">wouldblock</span><span style="font-family: 宋体; font-size: 12pt; padding-left: 41pt; line-height: 160%">被设置为</span><span style="font-family: Consolas; font-size: 12pt; padding-left: 41pt; line-height: 160%">true</span><span style="font-family: 宋体; font-size: 12pt; padding-left: 41pt; line-height: 160%">（为返回值）</span></div>
<div><span style="font-family: 宋体; font-size: 10pt; font-weight: bold; color: #ff0000; padding-left: 41pt; line-height: 160%">* &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; color: #ff0000; padding-left: 41pt; line-height: 160%">operation</span><span style="font-family: 宋体; font-size: 12pt; padding-left: 41pt; line-height: 160%">参数的值：</span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; color: #ff0000; padding-left: 41pt; line-height: 160%">LOCK_SH</span><span style="font-family: Consolas; font-size: 12pt; padding-left: 41pt; line-height: 160%">(</span><span style="font-family: 宋体; font-size: 12pt; padding-left: 41pt; line-height: 160%">读锁定</span><span style="font-family: Consolas; font-size: 12pt; padding-left: 41pt; line-height: 160%">), </span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; color: #ff0000; padding-left: 41pt; line-height: 160%">LOCK_EX</span><span style="font-family: Consolas; font-size: 12pt; padding-left: 41pt; line-height: 160%">(</span><span style="font-family: 宋体; font-size: 12pt; padding-left: 41pt; line-height: 160%">写锁定</span><span style="font-family: Consolas; font-size: 12pt; padding-left: 41pt; line-height: 160%">), </span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; color: #ff0000; padding-left: 41pt; line-height: 160%">LOCK_UN</span><span style="font-family: Consolas; font-size: 12pt; padding-left: 41pt; line-height: 160%">(</span><span style="font-family: 宋体; font-size: 12pt; padding-left: 41pt; line-height: 160%">释放已有锁定</span><span style="font-family: Consolas; font-size: 12pt; padding-left: 41pt; line-height: 160%">), </span><span style="font-family: Consolas; font-size: 12pt; font-weight: bold; color: #ff0000; padding-left: 41pt; line-height: 160%">LOCK_NB</span><span style="font-family: Consolas; font-size: 12pt; padding-left: 41pt; line-height: 160%">(</span><span style="font-family: 宋体; font-size: 12pt; padding-left: 41pt; line-height: 160%">不阻塞与其它3个值或，即防止在请求加锁时发生阻塞，默认阻塞</span><span style="font-family: Consolas; font-size: 12pt; padding-left: 41pt; line-height: 160%">)</span></div>
<div><span style="font-family: 宋体; font-size: 10pt; font-weight: bold; padding-left: 41pt; line-height: 160%">* &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-family: 宋体; font-size: 12pt; padding-left: 41pt; line-height: 160%">无法在</span><span style="font-family: Consolas; font-size: 12pt; padding-left: 41pt; line-height: 160%">NFS</span><span style="font-family: 宋体; font-size: 12pt; padding-left: 41pt; line-height: 160%">或其它网络文件系统中使用，无法在早期不支持文件锁定的文件系统中使用，如</span><span style="font-family: Consolas; font-size: 12pt; padding-left: 41pt; line-height: 160%">FAT</span><span style="font-family: 宋体; font-size: 12pt; padding-left: 41pt; line-height: 160%">。它是在进程级别上实现的，多线程服务器</span><span style="font-family: Consolas; font-size: 12pt; padding-left: 41pt; line-height: 160%">API</span><span style="font-family: 宋体; font-size: 12pt; padding-left: 41pt; line-height: 160%">中也无法使用。</span></div>
<div><br /></div>
<div><br /></div>
<div><span style="font-family: 宋体; font-size: 18pt; font-weight: bold; padding-left: 9pt; line-height: 160%">2.6 更好的方式：数据库管理系统</span></div>
<div><span style="font-family: 宋体; font-size: 12pt; padding-left: 41pt; line-height: 160%">PHP的</span><span style="font-family: 宋体; font-size: 12pt; font-weight: bold; color: #ff0000; padding-left: 41pt; line-height: 160%">SQLite</span><span style="font-family: 宋体; font-size: 12pt; padding-left: 41pt; line-height: 160%">扩展，对普通文件提供了一个SQL接口，非功能全面的数据库，但也避免了&quot;锁定&quot;和其它使用普通文件相关的问题。</span></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><script type="text/javascript" language="javascript" src="jquery.js"></script><script type="text/javascript" language="javascript" src="itemlink.js"></script></body></html>